ContractSerializationDefaults (085-002): one authority for contract-seam JSON options#274
Merged
Conversation
…ract-seam JSON options The camelCase seam options were declared in NINE places by convention (task estimated three): web-spa program.cs, four copies inside timewarp-testing, web-spa-integration x3, api-server-integration convention, web-contracts-tests. All now reference ContractSerializationDefaults (foundation-contracts/types): a shared Options instance (STJ freezes on first use; no participant mutates) plus Apply for the DI Configure pattern. Two latent inconsistencies fixed by the sweep: - ApiServerTestConvention registered DEFAULT (PascalCase) options as the api test client's DI singleton — disagreeing with the seam, masked by case-insensitive paths. Now canonical; api integration tests pass. - The Person serialization smoke test used default options, exercising nothing the app actually does. Now runs against the real seam options. Verified: dev build 0/0; contracts 7, web-server integration 22, api-server integration 6, analyzers 26, sourcegen 16. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Kanban 085-002 — third inference-removal candidate: the contract-seam serializer options were declared in nine places by convention (the task estimated three). Now there is one:
ContractSerializationDefaultsin foundation-contracts (shared frozenOptionsinstance +Applyfor the DIConfigurepattern), referenced by the SPA client, all four timewarp-testing harness variants, both integration-test trees, and the contracts round-trip tests.Latent inconsistencies the sweep fixed
ApiServerTestConventionregistered default (PascalCase) options as the api test client's DI singleton — disagreeing with the camelCase seam, masked by case-insensitive deserialization paths.Server side deliberately untouched: ASP.NET Core's Web defaults are camelCase and framework-managed; the canonical type's Design region documents that the seam matches them.
Verification
dev build0/0 · contracts 7/7 · web-server integration 22 · api-server integration 6 (under corrected options) · analyzers 26 · sourcegen 16🤖 Generated with Claude Code